package com.tangyuan.feignapis.video;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tangyuan.dto.VideoPublisherDto;
import com.tangyuan.model.Video;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name ="service-video",contextId = "feignApi-video")
public interface IVideoFeignClient {
    @GetMapping("/feignApi/video/getVideoInfo")
    List<Video> getVideoInfo(@RequestParam("name") Long userId,
                                     @RequestParam("name") String name,
                                     @RequestParam("pageNum") Integer pageNum,
                                     @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/feignApi/video/getVideoByIds")
    List<Video> getVideoByIds(@RequestParam("ids") List<Long> ids,
                              @RequestParam("userId") Long userId);
    @GetMapping("/feignApi/video/getByVideoId/{videoId}/{userId}")
    Video getByVideoId(@PathVariable Long videoId,@PathVariable Long userId);

    @GetMapping("/feignApi/video/getVideoById/{videoId}")
    Video getByVideoId(@PathVariable Long videoId);

    @GetMapping("/feignApi/video/getMyVideoByUserId/{myUserId}/{userId}/{pageNum}/{pageSize}")
    List<Video> getMyVideoByUserId(@PathVariable("myUserId") Long myUserId,@PathVariable("userId") Long userId, @PathVariable("pageNum") Integer pageNum, @PathVariable("pageSize") Integer pageSize);

    @GetMapping("/feignApi/video/getVideoThumpNum/{userId}")
    Long getVideoThumpNum(@PathVariable("userId") Long userId);

    @GetMapping("/feignApi/video/getMyCollectVideo/{userId}/{pageNum}/{pageSize}")
    List<Video> getMyCollectVideo(@PathVariable("userId") Long userId, @PathVariable("pageNum") Integer pageNum, @PathVariable("pageSize") Integer pageSize);

    @GetMapping("/feignApi/video/getMyTrumpVideo/{userId}/{pageNum}/{pageSize}")
    List<Video> getMyTrumpVideo(@PathVariable("userId") Long userId, @PathVariable("pageNum") Integer pageNum, @PathVariable("pageSize") Integer pageSize);

    @GetMapping("/feignApi/video/getMyActionVideo/{userId}/{pageNum}/{pageSize}")
    Page<Video> getMyActionVideo(@PathVariable("userId") Long userId, @PathVariable("pageNum") Integer pageNum, @PathVariable("pageSize") Integer pageSize);

    @PostMapping("/feignApi/video/updateUserVideoMessage")
    void updateUserVideoMessage(@RequestBody VideoPublisherDto userVideoAvatarDto);
}
